package com.hdaccp.shuiguoD.controller;

import com.hdaccp.shuiguoD.entity.Jinhuoxx;
import com.hdaccp.shuiguoD.service.JinhuoxxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/jinhuoxx")
@Scope("prototype")
public class JinhuoxxController {
@Autowired
    public JinhuoxxService jinhuoxxService;


    @RequestMapping("/addxx")
    @ResponseBody
    public int addxx(Jinhuoxx jinhuoxx){
        return jinhuoxxService.addxx(jinhuoxx);
    }

    @RequestMapping("/cx")
    @ResponseBody
    public List<Jinhuoxx> cx(int dh){
        return jinhuoxxService.getAll(dh);
    }


    @RequestMapping("/query1")
    @ResponseBody
    public List<Jinhuoxx> query(){

        return jinhuoxxService.query1();
    }



}
